is someone have this error in integrate in vite & react js
Cannot read properties of null (reading 'useRef')
TypeError: Cannot read properties of null (reading 'useRef')
at useRef2 (
http://localhost:3000/node_modules/.vite/deps/@botpress_webchat.js?v=b4c25009:1078:29)
App.jsx
<Webchat
clientId="968d0a24-50ff-4419-8fc4-d0904a2bdb77" // Your client ID here
style={{
width: '400px',
height: '600px',
display: isWebchatOpen ? 'flex' : 'none',
position: 'fixed',
bottom: '90px',
right: '20px',
}}
/>
toggleWebchat()} style={{ position: 'fixed', bottom: '20px', right: '20px' }} />